package data.nanjing.expo.models.dao;

import data.nanjing.expo.models.domain.ActivityApplyInfo;
import data.nanjing.expo.models.domain.dto.FavoriteShow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by zjp on 2018/6/28.
 * QQ：34948062
 * github: https://www.github.com/zjp1029
 * web： http://www.zjp1029.cn
 */
public interface ActivityApplyInfoDao {

    //添加报名信息
    public Integer addActivityApplyInfo(ActivityApplyInfo activityApplyInfo);

    //查询是否已经报名
    public Integer selectApplyCountByUserIdAndActivityId(@Param("userId") Integer userId, @Param("activityId") Integer activityId);

    //删除报名信息
    public void deleteActivityApplyInfo(@Param("userId") Integer userId, @Param("activityId") Integer activityId);

    //查询我的报名信息
    public List<FavoriteShow> selectApplyListByUserId(@Param("userId") Integer userId,
                                                      @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);

    //我的报名总数
    public Integer selectApplyCountByUserId(@Param("userId") Integer userId);

    //活动的所有报名人
    public List<ActivityApplyInfo> selectApplyListByActivityId(@Param("activityId") Integer activityId,
                                                               @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);

    //查询数量
    public Integer selectApplyListCountByActivityId(@Param("activityId") Integer activityId);
}
